package com.erp.service.impl;

import com.erp.entity.RolePerms;
import com.erp.mapper.RolePermsMapper;
import com.erp.service.RolePermsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author pyj
 * @since 2020-11-07
 */
@Service
public class RolePermsServiceImpl implements RolePermsService {

    @Autowired
    private RolePermsMapper rolePermsMapper;


    @Override
    public RolePerms findRolePermsByName(String name) {
        return rolePermsMapper.findRolePermsByName(name);
    }

    @Override
    public List<RolePerms> getAll() {
        return rolePermsMapper.getAll();
    }

    @Override
    public int add(RolePerms rolePerms) {
        return rolePermsMapper.add(rolePerms);
    }

    @Override
    public int delete(Integer id) {
        return rolePermsMapper.delete(id);
    }

    @Override
    public int update(RolePerms rolePerms) {
        return rolePermsMapper.update(rolePerms);
    }
}
